import 'package:hotpot/generated/json/base/json_convert_content.dart';
import 'package:hotpot/models/account_move.dart';

AccountMove $AccountMoveFromJson(Map<String, dynamic> json) {
	final AccountMove accountMove = AccountMove();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		accountMove.id = id;
	}
	final String? createDate = jsonConvert.convert<String>(json['create_date']);
	if (createDate != null) {
		accountMove.createDate = createDate;
	}
	final String? invoiceDateDue = jsonConvert.convert<String>(json['invoice_date_due']);
	if (invoiceDateDue != null) {
		accountMove.invoiceDateDue = invoiceDateDue;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		accountMove.name = name;
	}
	final String? state = jsonConvert.convert<String>(json['state']);
	if (state != null) {
		accountMove.state = state;
	}
	final String? paymentState = jsonConvert.convert<String>(json['payment_state']);
	if (paymentState != null) {
		accountMove.paymentState = paymentState;
	}
	final String? amountTotal = jsonConvert.convert<String>(json['amount_total']);
	if (amountTotal != null) {
		accountMove.amountTotal = amountTotal;
	}
	return accountMove;
}

Map<String, dynamic> $AccountMoveToJson(AccountMove entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['create_date'] = entity.createDate;
	data['invoice_date_due'] = entity.invoiceDateDue;
	data['name'] = entity.name;
	data['state'] = entity.state;
	data['payment_state'] = entity.paymentState;
	data['amount_total'] = entity.amountTotal;
	return data;
}